package com.drm.netschool.mapper;

import com.drm.netschool.entity.SumerGroupBase;
import com.drm.netschool.entity.SumerGroupBaseExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface SumerGroupBaseMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int countByExample(SumerGroupBaseExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int deleteByExample(SumerGroupBaseExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    @Delete({
        "delete from sumer_group_base",
        "where group_id = #{groupId,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long groupId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    @Insert({
        "insert into sumer_group_base (group_id, group_nm, ",
        "group_txt, group_img, ",
        "create_id, create_dt, ",
        "del_yn, class_tp, ",
        "location_nm, group_notice)",
        "values (#{groupId,jdbcType=BIGINT}, #{groupNm,jdbcType=VARCHAR}, ",
        "#{groupTxt,jdbcType=VARCHAR}, #{groupImg,jdbcType=VARCHAR}, ",
        "#{createId,jdbcType=BIGINT}, #{createDt,jdbcType=TIMESTAMP}, ",
        "#{delYn,jdbcType=INTEGER}, #{classTp,jdbcType=VARCHAR}, ",
        "#{locationNm,jdbcType=VARCHAR}, #{groupNotice,jdbcType=VARCHAR})"
    })
    int insert(SumerGroupBase record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int insertSelective(SumerGroupBase record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    List<SumerGroupBase> selectByExample(SumerGroupBaseExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    @Select({
        "select",
        "group_id, group_nm, group_txt, group_img, create_id, create_dt, del_yn, class_tp, ",
        "location_nm, group_notice",
        "from sumer_group_base",
        "where group_id = #{groupId,jdbcType=BIGINT}"
    })
    @ResultMap("BaseResultMap")
    SumerGroupBase selectByPrimaryKey(Long groupId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int updateByExampleSelective(@Param("record") SumerGroupBase record, @Param("example") SumerGroupBaseExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int updateByExample(@Param("record") SumerGroupBase record, @Param("example") SumerGroupBaseExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    int updateByPrimaryKeySelective(SumerGroupBase record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sumer_group_base
     *
     * @mbggenerated Sat Aug 01 12:55:27 CST 2015
     */
    @Update({
        "update sumer_group_base",
        "set group_nm = #{groupNm,jdbcType=VARCHAR},",
          "group_txt = #{groupTxt,jdbcType=VARCHAR},",
          "group_img = #{groupImg,jdbcType=VARCHAR},",
          "create_id = #{createId,jdbcType=BIGINT},",
          "create_dt = #{createDt,jdbcType=TIMESTAMP},",
          "del_yn = #{delYn,jdbcType=INTEGER},",
          "class_tp = #{classTp,jdbcType=VARCHAR},",
          "location_nm = #{locationNm,jdbcType=VARCHAR},",
          "group_notice = #{groupNotice,jdbcType=VARCHAR}",
        "where group_id = #{groupId,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(SumerGroupBase record);
}